import 'package:json_annotation/json_annotation.dart';
import 'package:flutter_douban/model/user_model.dart';
part 'class_item_model.g.dart';


class ClassItemModelList {
  List<ClassItemModel> list;
  ClassItemModelList(this.list);
  factory ClassItemModelList.fromJson(List<dynamic> list) {
    return ClassItemModelList(
      list.map((item) => ClassItemModel.fromJson(item)).toList(),
    );
  }
}

@JsonSerializable()
class ClassItemModel {

  /// 课程id
  String? id;
  /// 课程描述
  String? t;
  ///
  String? p;
  /// 课程图片
  String? i;
  ///
  String? scc;
  ///
  String? d;
  /// 时间
  String? ct;
  /// 类型
  String? type;
  /// 连接
  String? action_url;
  ///
  String? sales;
  ///
  int? ec;
  ///
  String? un;
  ///
  int? s;
  ///
  String? ua;
  ///
  int? playStatus;
  /// 作者
  UserModel? anchor;
  /// 是否购买
  bool? is_buy = false;
  /// 是否收藏
  bool? is_collection = false;

  ClassItemModel(this.action_url,this.anchor,this.ua,this.playStatus,this.sales,this.p,this.type,
      this.un,this.ec,this.d,this.id,this.s,this.scc,this.i,this.t,this.ct,this.is_buy,this.is_collection);
  factory ClassItemModel.fromJson(Map<String,dynamic> json) => _$ClassItemModelFromJson(json);
  Map<String, dynamic> toJson() => _$ClassItemModelToJson(this);

}



